import React,{useState,useEffect} from 'react'


export default function T() {
let timer;

  const [time, setTime] = useState(60);

  useEffect(() => {
    timer = setInterval(() => {
      setTime((val) => {
        val--;
      });
    }, 1000);

    return () => clearInterval(timer);
  }, []);

  return <div>{"time"}</div>;
}

